{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1474
  Verdict: Accepted
}
uses 
	SysUtils, Math;
 
var
	i,ls,ans:longint;
	s:string;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(S);
ls:=length(s);
ans:=0;
for i:=1 to ls do
	inc(ans,ord(s[i])-48);
write(ans);
end.